<?php
$itemPerSection = 5;
$items = $data->items;
$pages = intval((count($items) - 1) / $itemPerSection) + 1;
$i = 0;
?>
<div class="account-token-view">
<?php
$stat = new stdClass();
$stat->credit = 0;
$stat->debit = 0;
for ($page = 0; $page < $pages; $page++) {
?>
	<?php $this
			->renderPartial('_tokenSection',
				array(
					'model' => $data,
					'items' => array_slice($items, $page * $itemPerSection, $itemPerSection),
					'page' => $page + 1,
					'pages' => $pages,
					'itemPerSection' => $itemPerSection,
					'stat' => $stat,
					'overallPage' => $overallPage
				));
	?>
<?php }
if (isset($overallPage)) {
	$overallPage->page += $pages;
}
?>
</div>
